package no1232;

class Solution {
    public boolean checkStraightLine(int[][] coordinates) {

        int x0 = coordinates[0][0];
        int y0 = coordinates[0][1];
        int x1 ,x2 , y1, y2 ;
        for (int i = 1 ; i < coordinates.length -1 ; i++) {
            x1 = coordinates[i][0];
            x2 = coordinates[i+1][0];
            y1 = coordinates[i][1];
            y2 = coordinates[i+1][1];
            if ((y2-y0)*(x1-x0)!= (y1-y0)*(x2 -x0)){
                return false;
            }
        }

        return true;
    }
}
